package com.flying.acls.model.jdbc;

import com.flying.acls.model.SidExpr;
import com.flying.acls.model.SidExpr;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.security.access.prepost.PostFilter;
import org.springframework.security.access.prepost.PreAuthorize;

import java.util.List;

public interface SidExprRepository extends JpaRepository<SidExpr, Long>, QuerydslPredicateExecutor<SidExpr> {
    @PreAuthorize("authenticated")
    @PostFilter("hasPermission(filterObject, 'READ')")
    List<SidExpr> findAll();
}